<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
    <link href="ico/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="keywords" content="关键词,5个左右,单个8汉字以内" />
    <meta name="description" content="网站描述，字数尽量空制在80个汉字，160个字符以内" />
    <title>活动规则</title>
    <!-- 布局样式 -->
    <link rel="stylesheet" type="text/css" href="../addons/haoman_dpm/images/main.css?v=2222">
    <script type="text/javascript" charset="utf-8" src="../addons/haoman_dpm/common/jquery-2.1.4.min.js"></script>
    <link rel="stylesheet" href="../addons/haoman_dpm/common/swiper.min.css">
    <script type="text/javascript" src="../addons/haoman_dpm/common/swiper.min.js"></script>
    <link rel="stylesheet" href="../addons/haoman_dpm/mobimg/dropload.min.css?v=20161124170424" />
    <!-- <link rel="stylesheet" href="../addons/haoman_dpm/mobimg/bottom.css?v=201611224" /> -->
    <style type="text/css" id="_zoom"></style>
    <script type="text/javascript" src="../addons/haoman_dpm/mobimg/index.js?v=20161124170424"></script>
    <style>
    *{padding: 0;margin: 0px;}

    .list_gallery li {width: 50%;height: 400px;background-color: #c00;padding: 5px;}
    .box img {margin-right: 10px;}
    body{background-image: url({$bg});background-repeat: no-repeat;background-size: 100% auto;background-attachment:fixed;background-color: #a40001;}
    /*.menulist .menu_item2 {
    }
    .menulist div a img {
        margin-bottom: 2px;
    }*/
    </style>
</head>

<body>
    <div class="page_help">

        <div class="jx_title">
            <img src="../addons/haoman_dpm/images/rulestop.jpg" width="100%">
        </div>
        <div class="notice" style="color:#fff;padding:10px;line-height:1.7;font-size:15px;word-wrap:break-word;word-break:break-all;">
            {$reply['rules']}
        </div>

        {if $reply['is_show_prize']==0}
            <div id="prizeshow" style="width: 97%;">
                <img src="../addons/haoman_dpm/images/prize.png" style="position: relative;top: 0px;left:20px;width:25%;z-index: 99">
                <!-- Swiper -->
                <div class="swiper-container" style="margin-left: 10px;margin-bottom: 15px;margin-top: -20px">
                    <div class="swiper-wrapper">

                        {loop $prize $rows}
                        <div class="swiper-slide" style="padding: 0px;height: 180px;border-radius: 3px;">
                            <img src="{php echo tomedia($rows['awardsimg'])}" style="width:96%;height: 100px;margin-top: 15px;margin-left: 2%">
                            <p style="font-size:0.6rem;color: #666;margin-top: 0px;">{$rows['prizename']}</p>
                            {if $reply['is_show_prize_num']==0&&$rows['turntable']==2}
                            <p style="font-size:0.8rem;color: #666;margin-top: 5px;">剩余({php echo $rows['awardstotal'] - $rows['prizedraw']})份</p>
                            {else if $reply['is_show_prize_num']==0&&$rows['turntable']==1}
                            <p style="font-size:0.8rem;color: #666;margin-top: 5px;">不限制(抽奖)</p>
                            {/if}
                            <p style="font-size:0.6rem;color: #333;margin-top: 5px;font-weight: 700">{$rows['prizetxt']}</p>
                        </div>
                        {/loop}

                    </div>
                </div>
            </div>

            <script>
                var swiper = new Swiper('.swiper-container', {
                    pagination: '.swiper-pagination',
                    slidesPerView: 3,
                    paginationClickable: true,
                    spaceBetween: 8,
                    freeMode: true
                });
            </script>
            {/if}
        <!-- <div class="mb40"></div> -->
        <!--底部文件-->
        <!--底部文件-->

        <!-- <div style="text-align:center;margin:0.5em 0 0 0;color:#E9E900;"><a href="{php echo $this->createMobileUrl('index', array('id' => $rid))}">返回抽奖</div> -->
        <div style="height:3.4em;"></div>
    </div>

<!-- <div style="width:100%;height:100px;"></div>
<div class="menulist">
    <div class="menu-wrap">
        <div class="menu-container">
            <div class="menu_item menu_item1"><span></span>
                <a class="success" data-index="1" href="{php echo $this->createMobileUrl('messagesindex', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item1.png">
                    <s>发消息</s>
                </a>
            </div>
            <div class="menu_item menu_item6"><span></span>
                <a class="success" data-index="6" href="{php echo $this->createMobileUrl('index', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item6.png">
                    <s>流程</s>
                </a>
            </div>

            <div class="menu_item menu_item2"><span></span>
                <a class="success" data-index="5" href="{php echo $this->createMobileUrl('go_toupiao', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item2.png?v=42343">
                    <s>投票</s>
                </a>
            </div>

            <div class="menu_item menu_item4"><span></span>
                <a class="success" data-index="3" href="{php echo $this->createMobileUrl('qhbIndex', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item4.png">
                    <s>抢红包</s>
                </a>
            </div>
            
            <div class="menu_item menu_item5">
                <a class="success" data-index="4" href="{php echo $this->createMobileUrl('mybobing', array('id' => $rid))}"><img alt="" src="../addons/haoman_dpm/mobimg/item5.png">
                    <s>我的</s>
                </a>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div> -->
    <div class="power-by" style="position: fixed;bottom: 50px;width: 100%;left: 0px;right: 0px;font-size: 12px;text-align: center;color:#EAB387;">
        <div class="copyright fixed">{if empty($reply['copyright'])} &copy;{$_W['account']['name']}{else}&copy;{$reply['copyright']}{/if}</div>
    </div>
{template 'm_footer'}
</body>



<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    // JS分享借用权限开始

    // JS分享借用权限结束

    wx.config({
        debug:false,
        appId: '{$package["appId"]}',
        timestamp: '{$package["timestamp"]}',
        nonceStr: '{$package["nonceStr"]}',
        signature: '{$package["signature"]}',
        jsApiList: [
            'getLocation', {if $reply['share_type'] != 2}'onMenuShareTimeline','onMenuShareQQ','onMenuShareQZone','onMenuShareAppMessage','onMenuShareWeibo'{/if}
    ]
    });
    var sharedata = {
        "imgUrl" : "{$shareimg}",
        "link" : "{$sharelink}",
        "desc" : "{$sharedesc}",
        "title" : "{$sharetitle}"
    };

    wx.ready(function () {
        {if $reply['isallowip']==1}
        wx.getLocation({
            type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
            success: function (res) {

                var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
                var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
                var speed = res.speed; // 速度，以米/每秒计
                var accuracy = res.accuracy; // 位置精度



                var submitData = {
                    lat: latitude,
                    lon: longitude,
                    lbsip: "{$reply['allowip']}"
                };


                $.post('{php echo $this->createMobileUrl('getlbs',array('id' => $rid))}', submitData, function(idata) {

                    if (idata.success == 1) {

                    } else {
                        alert(idata.msg);
                        location.href = "{php echo $this->createMobileUrl('other', array('id' => $rid,'type'=>2))}";

                    }
                },"json");

            },
            fail: function () {
                alert("获取位置失败,请打开GPS功能！");
                location.href = "{php echo $this->createMobileUrl('index', array('id' => $rid))}";

            }
        });
        {/if}

        {if $reply['share_type'] == 2}
        wx.hideOptionMenu();
        {else if $reply['share_type'] == 1}
        wx.showOptionMenu();
        wx.onMenuShareAppMessage(sharedata);
        wx.onMenuShareTimeline(sharedata);
        wx.onMenuShareQQ(sharedata);
        wx.onMenuShareQZone(sharedata);
        wx.onMenuShareWeibo(sharedata);
        {else}
        wx.showOptionMenu();
        wx.onMenuShareAppMessage(sharedata);
        wx.onMenuShareTimeline(sharedata);
        wx.onMenuShareQQ(sharedata);
        wx.onMenuShareQZone(sharedata);
        wx.onMenuShareWeibo(sharedata);
        {/if}
    });

</script>
</html>
